<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);	// redirect 
// curl_setopt($ch, CURLOPT_MAXREDIRS, 2); 	// maximum redirect times
$page = curl_exec($ch);

curl_close($ch);
print $page;
?>